package blue.mqtt4j.client;

import blue.mqtt4j.internal.client.impl.DefaultMqttOptions;

/**
 * @author Jin Zheng
 * @since 1.0 2020-09-30
 */
public interface MqttOptions
{

	static MqttOptions newMqttOptions()
	{
		return new DefaultMqttOptions();
	}

	String username();

	String password();

	void setAuthorization(String username, String password);

	String clientId();

	void setClientId(String clientId);

	int maxThreads();

	void setMaxThreads(int maxThreads);

	int timeoutMillis();

	void setTimeoutMillis(int timeoutMillis);

	int keepAliveSecs();

	void setKeepAliveSecs(int keepAliveSecs);

	String willTopic();

	MqttQoS willQoS();

	byte[] willMessage();

	boolean willRetain();

	void setWillMessage(String willTopic, MqttQoS willQoS, byte[] willMessage, boolean willRetain);

}
